package com.dlc.shop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dlc.shop.bean.dto.wukong.ChannelDTO;
import com.dlc.shop.bean.dto.wukong.SetUnreadDTO;
import com.dlc.shop.bean.model.ImChannel;

import java.util.List;

/**
 * 频道关联表
 * @author TRACK
 */
public interface ImChannelService extends IService<ImChannel> {

    /**
     * 创建频道
     * @param imChannel
     * @param channelDTO
     * @param nickName
     */
    void createChannel(ImChannel imChannel, ChannelDTO channelDTO, String nickName);

    /**
     * 转接客服
     * @param imChannel
     * @param uid
     * @param nickName
     */
    void updateChannel(ImChannel imChannel, String uid, String nickName);

    /**
     * 获取频道信息
     * @param channelId
     * @return
     */
    ImChannel getByChannelId(String channelId);

    /**
     * 管理员删除或禁用，将其移除对应订阅，将参与白名单的频道加入超管
     * @param employeeId
     * @param shopId
     * @param isDelete 是否删除 0否1是
     * @param nickName 超管昵称
     */
    void removeSubscribers(Long employeeId, Long shopId, Integer isDelete, String nickName);

    /**
     * 设为已读
     * @param setUnreadDTO
     * @param userType
     */
    void setUnread(SetUnreadDTO setUnreadDTO, Integer userType);

    /**
     * 更新最大数
     * @param setUnreadDTO
     * @param userType
     */
    void updateSeq(SetUnreadDTO setUnreadDTO, Integer userType);

    /**
     * 更新自动回复
     * @param channelId
     * @param sendAutoReply
     * @param content
     * @param uid
     */
    void updateAuto(String channelId, Integer sendAutoReply, String content, String uid);

    /**
     * 根据id获取由该管理员进行沟通（在白名单内的）的频道信息
     * @param shopId
     * @return
     */
    List<String> listChannelByShopId(Long shopId);

    /**
     * 获取用户频道
     * @param userId
     * @return
     */
    List<ImChannel> listChannelByUserId(String userId);

    /**
     * 更新资料
     * @param employeeId
     * @param shopId
     * @param userId
     */
    void updateMember(Long employeeId, Long shopId, String userId);
}
